//
//  AttributeString.m
//  NSSTRING
//
//  Created by 梁晨 on 2017/6/16.
//  Copyright © 2017年 梁晨. All rights reserved.
//

#import "AttributeString.h"

@implementation AttributeString


+(NSMutableAttributedString *)string:(NSString *)string LineSpace:(NSInteger )lineSpace font:(CGFloat )font color:(UIColor *)color worldSpace:(NSInteger )worldSpace
{
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:lineSpace];
    NSDictionary *attrDict3 = @{ NSKernAttributeName: @(worldSpace),
                                 NSFontAttributeName: [UIFont systemFontOfSize: font],NSParagraphStyleAttributeName:paragraphStyle,
                                 NSForegroundColorAttributeName:color
                                 };
    
    NSMutableAttributedString *AttributedString = [[NSMutableAttributedString alloc]initWithString:string attributes:attrDict3];
    return AttributedString;
}


@end
